<template>
  <div id="app">
    <a-config-provider :locale="locale">
      <router-view />
    </a-config-provider>
  </div>
</template>

<script>
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
import config from "./config";
export default {
  name: "App",
  data() {
    return {
      locale: zhCN,
    };
  },
  mounted() {
    if (config.btnColor) {
      document.documentElement.style.setProperty("--u-btn-bg", config.btnColor);
    }

    if (config.menuColor) {
      document.documentElement.style.setProperty(
        "--menu-color",
        config.menuColor
      );
    }

    if (config.menuActiveColor) {
      document.documentElement.style.setProperty(
        "--menu-active-color",
        config.menuActiveColor
      );
    }

    if (config.menuActiveBackground) {
      document.documentElement.style.setProperty(
        "--menu-active-bg",
        config.menuActiveBackground
      );
    }

    if (config.menuActiveBorder) {
      document.documentElement.style.setProperty(
        "--menu-active-border",
        config.menuActiveBorder
      );
    }
  },
};
</script>

<style>
label {
  font-weight: normal;
}
</style>
